package self.hoy.demo.tof.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.LinkedList;
import java.util.List;

/**
 * layui的动态表格的数据格式
 * @author hyh
 * @date 2020/7/2
 */
@Data
@AllArgsConstructor
public class LayUiVo<T> {
      private int code;
      private String msg;
      private int count;
      private List<T> data;

      public LayUiVo(List<T> list) {
            this(0,"成功", (list == null ? new LinkedList<>() : list).size(), list);
      }
}
